<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<!-- 防止事件冒泡    .stop修饰-->
<div @click='divBox' id="divBox">
    <a href="https://www.baidu.com" @click.stop.prevent="buttonS" id="buttonS">按钮</a>
</div>



<body>

</body>
<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
<script>
    const app = new Vue({
        el: '#divBox',
        data: {},
        methods: {
            divBox: function() {
                console.log('divBox');
            },
            buttonS: function() {
                console.log('buttonS');
            }
        },
    })
</script>

</html>